package com.xilihui.xlh.core.app;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.xilihui.xlh.R;
import com.xilihui.xlh.core.util.LogUtil;

import butterknife.BindView;

/**
 * Created by Administrator on 2018/5/18.
 */

public abstract class ToolBaseCompatActivity extends BaseCompatActivity{
  
    @BindView(R.id.iv_toolbar_left)
    public ImageView iv_leftBack;
    @BindView(R.id.tv_toolbar_title)
    TextView tv_title;
    @BindView(R.id.iv_toolbar_right)
    ImageView iv_right;
    @BindView(R.id.tv_toolbar_right)
    TextView tv_right;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    public void setToolTitle(String title){
        tv_title.setText(title);
    }
    
    public void setToolRightText(String text){
        tv_right.setText(text);
    }
    
    public void setToolRightText(int resid){
        tv_right.setVisibility(View.VISIBLE);
        iv_right.setVisibility(View.GONE);
        tv_right.setText(resid);
    }
    
    public void setToolRightImage(int resid){
        tv_right.setVisibility(View.GONE);
        iv_right.setVisibility(View.VISIBLE);
        iv_right.setImageResource(resid);
    }
    
}
